home *** CD-ROM | disk | FTP | other *** search
/ CompuServe CD 495W / Compuserve XTreme Edition 495W.iso / shopping / toyota / toyota.dir / 00254.ls < prev    next >
Encoding:
Text File  |  1995-08-09  |  6.6 KB  |  264 lines

  1. on showModel whichModel
  2.   go("lineup")
  3.   puppetSprite(45, 1)
  4.   puppetSprite(46, 1)
  5.   set the locH of sprite 45 to 250
  6.   set the stretch of sprite 46 to 0
  7.   puppetTransition(5, 2, 2, 1)
  8.   set the castNum of sprite 46 to the number of cast (whichModel & ".pict")
  9.   updateStage()
  10. end
  11.  
  12. on hideModel
  13.   set the mouseDownScript to EMPTY
  14.   if rollOver(26) or rollOver(27) or rollOver(28) then
  15.     nothing()
  16.   else
  17.     dontPassEvent()
  18.   end if
  19.   puppetTransition(6, 2, 2, 1)
  20.   set the castNum of sprite 46 to 0
  21.   updateStage()
  22.   puppetSprite(46, 0)
  23.   go("tm")
  24. end
  25.  
  26. on airplaneRollover
  27.   global gLastRollover
  28.   if rollOver(gLastRollover) then
  29.     exit
  30.   end if
  31.   repeat with n = 6 to 13
  32.     if rollOver(n) then
  33.       set the castNum of sprite 5 to the number of cast "compass.text" + (n - 6)
  34.       updateStage()
  35.       set gLastRollover to n
  36.       exit repeat
  37.       next repeat
  38.     end if
  39.     set the castNum of sprite 5 to 0
  40.     updateStage()
  41.   end repeat
  42. end
  43.  
  44. on eyesRollover
  45.   if the mouseV > 370 then
  46.     set the locV of sprite 6 to 314
  47.   else
  48.     if (the mouseV < 370) and (the mouseV > 250) then
  49.       set the locV of sprite 6 to 312
  50.     else
  51.       if the mouseV < 250 then
  52.         set the locV of sprite 6 to 310
  53.       end if
  54.     end if
  55.   end if
  56.   if the mouseH > 380 then
  57.     set the locH of sprite 6 to 312
  58.   else
  59.     if (the mouseH < 380) and (the mouseH > 300) then
  60.       set the locH of sprite 6 to 310
  61.     else
  62.       if the mouseH < 300 then
  63.         set the locH of sprite 6 to 308
  64.       end if
  65.     end if
  66.   end if
  67.   if (the mouseH > 288) and (the mouseH < 328) and (the mouseV > 307) and (the mouseV < 318) then
  68.     set the width of sprite 6 to 60
  69.   else
  70.     set the width of sprite 6 to the width of cast "eyes"
  71.   end if
  72.   updateStage()
  73. end
  74.  
  75. on quitScript
  76.   repeat with n = 1 to 48
  77.     puppetSprite(n, 0)
  78.   end repeat
  79.   sound stop 1
  80.   sound stop 2
  81.   puppetTransition(0)
  82.   updateStage()
  83.   go("disclaimer")
  84. end
  85.  
  86. on setScore whichCategory
  87.   global scaleScore
  88.   set theBox to the clickOn - 10
  89.   set origin to the locH of sprite 14
  90.   repeat while the mouseDown
  91.     if (the mouseH > origin) and (the mouseH < (origin + 80)) then
  92.       set value to integer((the mouseH - origin) / 20) + 1
  93.       set the locH of sprite theBox to ((value - 1) * 20) + origin
  94.       updateStage()
  95.       next repeat
  96.     end if
  97.     if the mouseH < origin then
  98.       set the locH of sprite theBox to origin
  99.       updateStage()
  100.       next repeat
  101.     end if
  102.     if the mouseH > (origin + 80) then
  103.       set the locH of sprite theBox to origin + 80
  104.       updateStage()
  105.     end if
  106.   end repeat
  107. end
  108.  
  109. on checkScale
  110.   global gScore
  111.   set gScore to 0
  112.   set origin to the locH of sprite 14
  113.   repeat with n = 5 to 13
  114.     set value to ((the locH of sprite n - origin) / 20) + 1
  115.     set gScore to gScore + value
  116.   end repeat
  117.   if gScore < 9 then
  118.     set the castNum of sprite 4 to the number of cast "s-4"
  119.   else
  120.     if (gScore > 8) and (gScore < 13) then
  121.       set the castNum of sprite 4 to the number of cast "s-3"
  122.     else
  123.       if (gScore > 12) and (gScore < 17) then
  124.         set the castNum of sprite 4 to the number of cast "s-2"
  125.       else
  126.         if (gScore > 16) and (gScore < 26) then
  127.           set the castNum of sprite 4 to the number of cast "s-1"
  128.         else
  129.           if (gScore > 25) and (gScore < 29) then
  130.             set the castNum of sprite 4 to the number of cast "s0"
  131.           else
  132.             if (gScore > 28) and (gScore < 32) then
  133.               set the castNum of sprite 4 to the number of cast "s1"
  134.             else
  135.               if (gScore > 31) and (gScore < 36) then
  136.                 set the castNum of sprite 4 to the number of cast "s2"
  137.               else
  138.                 if (gScore > 35) and (gScore < 40) then
  139.                   set the castNum of sprite 4 to the number of cast "s3"
  140.                 else
  141.                   if gScore > 39 then
  142.                     set the castNum of sprite 4 to the number of cast "s4"
  143.                   end if
  144.                 end if
  145.               end if
  146.             end if
  147.           end if
  148.         end if
  149.       end if
  150.     end if
  151.   end if
  152.   if (gScore > 25) and (gScore < 29) then
  153.     set the foreColor of sprite 24 to 255
  154.     set the foreColor of sprite 25 to 255
  155.   else
  156.     if gScore < 26 then
  157.       set the foreColor of sprite 24 to 255
  158.       set the foreColor of sprite 25 to 35
  159.     else
  160.       if gScore > 28 then
  161.         set the foreColor of sprite 24 to 197
  162.         set the foreColor of sprite 25 to 255
  163.       end if
  164.     end if
  165.   end if
  166.   updateStage()
  167. end
  168.  
  169. on mySound whichSoundFile
  170.   global gCurrentSoundFile
  171.   set gCurrentSoundFile to whichSoundFile
  172.   if gCurrentSoundFile <> EMPTY then
  173.     puppetSound(0)
  174.     puppetSound(whichSoundFile)
  175.   end if
  176.   set the timeoutLapsed to 0
  177. end
  178.  
  179. on sfx whichSoundFile
  180.   if the machineType = 256 then
  181.     sound playFile 2, the pathName & "sfx\" & whichSoundFile
  182.   else
  183.     sound playFile 2, the pathName & "sfx:" & whichSoundFile
  184.   end if
  185.   set the timeoutLapsed to 0
  186. end
  187.  
  188. on idleBoy
  189.   global gSoundID
  190.   if gSoundID = 0 then
  191.     mySound("idle01.aif")
  192.     set gSoundID to gSoundID + 1
  193.   else
  194.     if gSoundID = 1 then
  195.       mySound("idle02.aif")
  196.       set gSoundID to gSoundID + 1
  197.     else
  198.       if gSoundID = 2 then
  199.         mySound("idle03.aif")
  200.         set gSoundID to 0
  201.       end if
  202.     end if
  203.   end if
  204.   if marker(0) = 14 then
  205.     puppetSprite(6, 1)
  206.     set the castNum of sprite 6 to the number of cast "MAN LOOP"
  207.     updateStage()
  208.     set the timer to 0
  209.     repeat while the timer < 120
  210.       go(the frame)
  211.     end repeat
  212.   end if
  213. end
  214.  
  215. on ROLLCHECK
  216.   global gPreviousRollover
  217.   if rollOver(gPreviousRollover) = 0 then
  218.     if rollOver(5) then
  219.       set gPreviousRollover to 5
  220.       sfx("hammer.aif")
  221.     else
  222.       if rollOver(6) then
  223.         set gPreviousRollover to 6
  224.         sfx("ratchet.aif")
  225.       else
  226.         if rollOver(7) then
  227.           set gPreviousRollover to 7
  228.           sfx("tip01.aif")
  229.         else
  230.           if rollOver(8) then
  231.             set gPreviousRollover to 8
  232.             sfx("chisel.aif")
  233.           else
  234.             if rollOver(9) then
  235.               set gPreviousRollover to 9
  236.               sfx("tip02.aif")
  237.             else
  238.               if rollOver(10) then
  239.                 set gPreviousRollover to 10
  240.                 sfx("ratchet.aif")
  241.               else
  242.                 if rollOver(11) then
  243.                   set gPreviousRollover to 11
  244.                   sound stop 2
  245.                   sfx("handsaw.aif")
  246.                 else
  247.                   if rollOver(12) then
  248.                     set gPreviousRollover to 12
  249.                     sfx("tip01.aif")
  250.                   end if
  251.                 end if
  252.               end if
  253.             end if
  254.           end if
  255.         end if
  256.       end if
  257.     end if
  258.   end if
  259. end
  260.  
  261. on idleCD
  262.   mySound("deal03.aif")
  263. end
  264.